Circuit of scanner to perform color space conversion on RGB signal

ABSTRACT

A circuit of a scanner to perform a color space conversion on an RGB signal. The circuit has several sampling-amplified-offset devices to sample, amplify and compensate potential of an R charge signal, a G charge signal and a B charge signal to obtain an R analog signal, a G analog signal and a B analog signal. The circuit further has a gain adder to multiply the corresponding weighted gain with the R analog signal, the G analog signal and the B analog signal. The multiplication results are then summed up to obtain an addition analog signal. A multiplexer is also included to select between the R analog signal, the G analog signal, the B analog signal and the addition analog signal for output.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The invention relates in general to a RGB signal processor of ascanner, and more particularly, to a circuit of a scanner to performcolor space conversion on an RGB signal.

[0003] 2. Description of the Related Art

[0004] The sensor used in the conventional color scanner includes acolor charge coupled device (CCD) or a contact image sensor (CIS). Thecolor charge coupled device is composed of several sensor cells todetect the light intensity of the three primary color lights, red light,green light and blue light. According to the detected result, an Rcharge signal, a B charge signal and a G charge signal are output. Asignal process is required for the R, B and G charge signal to becomethe input signals for the subsequent circuit. FIG. 1 shows a part of thecircuit for the signal process of a conventional scanner. The R chargesignal, the G charge signal and the B charge signal are sent to thesampling-amplified-offset devices 102, 104 and 106. After sampling,amplifying and level compensations for the R charge signal, the G chargesignal and the B charge signal by the sampling-amplified-offset devices102, 104 and 106, R, G and B analog signals are generated. Themultiplexer 108 sends the R, G and B analog signals to theanalog-digital (A/D) converter 110. The analog-digital converter 110then converts the R, G and B analog signals to digital signals andoutput them to the subsequent circuit.

[0005] When the color scanned result is output in gray scale, any one ofthe R, G and B analog signals is selected as the gray scale analogsignal output. As shown in FIG. 1, when the multiplexer 108 selects theR analog signal as the gray scale analog signal output to theanalog-digital converter 110, the G and B analog signals are not outputto the analog-digital converter 110 via the multiplexer 108.

[0006] The above method uses the brightness of the R analog signal todetermine the level of gray scale. When the brightness of the R analogsignal at one pixel increases, the color of the pixel approaches white.In contrast, the color of the pixel approaches black when the brightnessdecreases. However, when the brightness of the R analog signal for thepixel is low, this means that the brightness of the G and B analogsignals for the pixel is too low. If the brightness of either the G or Banalog signal is high, the gray scale level of the displayed color forthe pixel is incorrect.

[0007] In the RGB color model, the image is composed of threeindependent images. Each primary color corresponds a plane. When thethree image planes are transmitted to the RGB display, a frame of acolor image is obtained by combining these three image planes.Therefore, when the image itself is represented by three color planes,it is meaningful to apply the RGB model for the image process. On theother hand, RGB model is applied to most of the color camcorders used toobtain digital images. Therefore, it is a very important model for imageprocess.

[0008] Another important model is the yuv model. The advantage foradapting the yuv model is that the brightness y can be separated fromthe correlated u and v. Further, the RGB color model can be convertedinto other models such as the theoretical three primary colorsstimulated values X, Y and Z, the Adams chrominance-brightness space,and the CYM (cyan magenta yellow) color model. The yuv model using theRGB color model conversion is introduced as an example here.

[0009] When using the RGB color model in the yuv color model, the R, Gand B analog signals are converted into individual digital signals. Asoftware (such as a conversion program) is used to convert the digitalsignals into parameters of the yuv color space. The drawback of usingthe software to convert the RGB color model signal and the yuv colormodel is extremely high time consumption.

SUMMARY OF THE INVENTION

[0010] The invention provides a circuit for color space conversion of aRGB signal for a scanner. The circuit can be applied for a gray scalescan to reflect exactly the response of each pixel towards the grayscale. When applied to the conversion of RGB color model in differentcolor models, a hardware is implemented to execute the conversion suchthat the conversion time of the color model signal into different colormodels is reduced.

[0011] The invention provides a circuit for color space conversion ofRGB signals of a scanner. The circuit includes severalsampling-amplified-offset devices to obtain an R analog signal, a Ganalog signal and a B signal by sampling, amplifying and levelcompensating a R charge signal, a G charge signal and a B charge signal,respectively. The circuit further includes a gain adder to multiply theR analog signal, the G analog signal and the B analog signal by aweighted gain. The multiplication results are then added together toresult in an addition analog signal. A multiplexer is also included inthe circuit to select the R analog signal, the G analog signal, the Banalog signal or the addition analog signal as output. The gain adderincludes several gain amplifiers and an adder. The gain amplifiersobtain several weighted analog signals by multiplying the R analogsignal, the G analog signal and the B analog signal by the correspond inG-weighted gains. The adder performs an addition operation on theweighted analog signals to obtain the addition analog signal. Thus, thegray scale response of the scanner can be reflected exactly. Theconversion of the RGB color model signal into different color models canbe executed by hardware.

[0012] Both the foregoing general description and the following detaileddescription are exemplary and explanatory only and are not restrictiveof the invention, as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013]FIG. 1 shows a part of signal processing circuit of a conventionalscanner;

[0014]FIGS. 2A and 2B shows the signal processing circuit of a scannerconverting the RGB into gray scale and yuv color model in one embodimentof the invention; and

[0015]FIGS. 3A and 3B shows another embodiment of the signal processingcircuit of a scanner converting the RGB into gray scale and yuv colormodel.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0016]FIG. 2A shows an embodiment of a signal processing circuit of ascanner that converts RGB into the gray scale and the yuv color model.In FIG. 2A, the R charge signal, G charge signal and R charge signaldetected by a sensor cell (not shown) are sent tosampling-amplified-offset devices 202, 204, 206. Thesampling-amplified-offset devices 202, 204, 206 sample, amplify andcompensate potential levels of the R, G and B charge signals to obtainan R analog signal, a G analog signal and a B analog signal.

[0017] The adder 214 performs an addition operation on the R analogsignal, the G analog signal and the B analog signal to obtain anaddition analog signal. The multiplexer 216 selects the R analog signal,the G analog signal, the B analog signal or the addition analog signalfor output to the analog-digital converter 218. The output analog signalis then converted into a digital signal by the analog-digital converter218.

[0018] In FIG. 2A, the sampling-amplified-offset devices 202, 204, 206further comprise several devices. For example, thesampling-amplified-offset device 202 has a correlated double sampler208, a programmable gain amplifier 210 and an offset device 212. Thecorrelated double sampler 208 performs two times of sampling on the Rcharge signal and performs a subtraction operation on the samplingresults to obtain an R brightness. The programmable gain amplifier 210adjusts a gain value (the adjusting range is determined to the bitlength for storing the gain value). The R brightness output from thecorrelated double sampler 208 is amplified to obtain an R-amplifiedbrightness. The offset device 212 compensates the level of theR-amplified brightness to obtain the R analog signal. Similarly, thesampling-amplified-offset devices 204, 206 are similar to thesampling-amplified-offset device 202.

[0019] The conversion relation between the RGB color model and the yuvcolor model can be represented by the following matrix. $\begin{bmatrix}u \\v\end{bmatrix} = {{\begin{matrix}0.596 & {- 0.275} & {- 0.321} \\0.212 & {- 0.523} & 0.311\end{matrix}}{\begin{matrix}G \\B\end{matrix}}}$

[0020] In the above equation, y represents the luminance, u representsthe hue, and v represents saturation. If only the brightness of the yuvcolor model is used, the circuit as shown in FIG. 2A can complete therequirement. According to the above matrix, the relation between thebrightness y and the RGB signal is:

y=0.299R+0.587G+0.114B

[0021] Therefore, the adjustable gain values of the programmable gainamplifier 210, 209 and 211 in FIG. 2A are 0.299, 0.587 and 0.114,respectively.

[0022] In FIG. 2A, the programmable gain amplifier and offset device(such as the programmable gain amplifier 210 and thesampling-amplified-offset devices 202, 204, 206) can be interchanged. Asshown in FIG. 2B, the correlation double sampler 248 of thesampling-amplified-offset device 232 samples the R charge signal twice.A subtraction operation is performed on the sampled results to obtain anR brightness. The offset device 241 compensates the level of the Rbrightness to obtain an R-compensated brightness. The programmable gainamplifier 245 can adjusts a gain value. The R-compensated brightnessoutput from the offset device 241 is amplified with the gain to obtainan R analog signal. The sampling-amplified-offset devices 233, 234 aresimilar to the sampling-amplified-offset device 232. The positions ofthe offset device and the programmable gain amplifier in the followingsampling-amplified-offset device are interchangeable.

[0023] Referring to FIG. 3A, another embodiment of a signal processingcircuit in a scanner to convert RGB into gray scale and yuv color modelis illustrated. In FIG. 3A, the R charge signal, the G charge signal andthe B charge signal detected by the sensor (not shown) are sent to thesampling-amplified-offset devices 302, 304, 306, respectively. Thesampling-amplified-offset devices 302, 304, 306 sample, amplify andcompensate levels of the R, G and B charge signals to obtain an R analogsignal, a G analog signal and a B analog signal.

[0024] Meanwhile, the gain amplifier 320 multiplies the R analog signalby a first weighted value to obtain and output an R-weighted analogsignal to the adder 314. The gain amplifier 322 multiplies the G analogsignal by a second weighted value to obtain and output a G-weightedanalog signal to the adder 314. The gain amplifier 324 multiplies the Banalog signal by a third weighted value to obtain and output aB-weighted analog signal to the adder 314.

[0025] The adder 314 performs an addition calculation the R-weightedanalog signal, the G-weighted analog signal and the B-weighted analogsignal output from the gain amplifiers 320, 322 and 324 to obtain anaddition analog signal. The multiplexer 316 can then select the R analogsignal, the G analog signal, the B analog signal or the addition analogsignal to output to the analog-digital converter 318, which thenconverts the selected signal into a digital signal.

[0026] In FIG. 3A, the sampling-amplified-offset devices 320, 304 and306 may also comprise a plurality of devices. For example, thesampling-amplified-offset device 302 includes a correlation doublesampler 308, a programmable gain amplifier 310 and an offset device 312.The correlation double sampler 308 performs sampling twice on the Rcharge signal to obtain two sampling results, which are then subtractedfrom each other to obtain an R luminance. The programmable gainamplifier 310 can adjust gain (of which the adjustable range isdetermined according tot eh bit length for storing gain value).According to the gain, the R luminance output from the correlationdouble sampler 308 is amplified to obtain an R-amplified luminance. Theoffset device 312 compensates the level of the R-amplified luminance toobtain the R analog signal. The sampling-amplified-offset devices 304and 306 have structures similar to that of the sampling-amplified-offsetdevices 302 and function similarly.

[0027] When the scanner is performing a gray scale scan, the R analogsignal, the G analog signal, and the B analog signal are adjusted withdifferent weighted values to obtain the R-weighted analog signal, theG-weighted analog signal and the B-weighted analog signal. The R, G andB-weighted analog signals are then added by the adder 314 to obtain anaddition analog signal. The multiplexer 316 then selects the R, GB-weighted analog or the addition analog signal and outputs the selectedone to the analog-digital converter 318 and the subsequent circuit.According to the luminance of the weight adjusted addition analogsignal, the analog-digital converter 318 and the subsequent circuit mayreflects the gray scale response of the scanner more precisely.

[0028] The conversion between the RGB color model and the yuv colormodel can be performed using the circuit as shown in FIG. 3A. Accordingto the above matrix state, the luminance y and the RGB signal arecorrelated as:

y=0.299R+0.587G+0.114B

[0029] Thus, the gain amplifier 320 in FIG. 3A has a first weightedvalue of 0.299. The gain amplifier 322 has a second weighted value of0.587, and the gain amplifier 324 has a third weighted value of 0.114.

[0030] If the above RGB color model is converted into a yuv color model,and the luminance y, hue u and saturation v in the yuv color model arerequired, the circuit in FIG. 3A has to be modified as the circuit inFIG. 3B.

[0031]FIG. 3B, the gain amplifier 351 multiplies the R analog signalwith a first weighted value to obtain and output a first R-weightedanalog signal to the adder 360. The gain amplifier 352 multiplies the Ganalog signal by a second weighted value to obtain and output a firstG-weighted analog signal to the adder 360. The gain amplifier 353multiplies the B analog signal by a third weighted value to obtain andoutput a first B-weighted analog signal to the adder 360. The gainamplifier 354 multiplies the R analog signal by a fourth weighted valueto obtain and output a second R-weighted analog signal to the adder 361.The gain amplifier 355 multiplies the G analog signal with a fifthweighted value to obtain and output a second G-weighted analog signal tothe adder 361. The gain amplifier 356 multiplies the B analog signal bya sixth weighted value to obtain and output a second B-weighted analogsignal to the adder 361. The gain amplifier 357 multiplies the R analogsignal by a seventh weighted value to obtain and output a thirdR-weighted analog signal to the adder 362. The gain amplifier 358multiplies the G analog signal by an eighth weighted value to obtain andoutput a third G-weighted analog signal to the adder 362. The gainamplifier 359 multiplies the B analog signal by a ninth weighted valueto obtain and output a third B-weighted analog signal to the adder 362.

[0032] The adder 360 performs an addition calculation on the firstR-weighted analog signal, the first G-weighted analog signal and thefirst B-weighted analog signal to obtain the luminance y. The adder 361performs an addition calculation on the second R-weighted analog signal,the second G-weighted analog signal and the second B-weighted analogsignal to obtain the hue u. The adder 362 performs an additioncalculation on the third R-weighted analog signal, the third G-weightedanalog signal and the third B-weighted analog signal to obtain thesaturation v. The multiplexer 364 may select the R analog signal, the Ganalog signal, the B analog signal, the luminance y, the hue u or thesaturation v. The selected one is then output to an analog-digitalconverter for conversion into a digital signal.

[0033] According to the matrix for converting RGB color model to yuvcolor model, the relationship between the luminance y, hue u andsaturation v can be expressed as: $\begin{matrix}{y = {{0.299R} + {0.587G} + {0.114B}}} \\{u = {{0.596R} - {0.275G} - {0.321B}}} \\{v = {{0.212R} - {0.523G} + {0.113B}}}\end{matrix}$

[0034] Therefore, in FIG. 3B, the first weighted value in the gainamplifier 351 is 0.299, the second weighted value of the gain amplifier352 is 0.587, and the third weighted value of the gain amplifier 353 is0.114. The fourth weighted value in the gain amplifier 354 is 0.596, thefifth weighted value of the gain amplifier 355 is −0.275, and the sixthweighted value of the gain amplifier 356 is −0.321. The seventh weightedvalue in the gain amplifier 357 is 0.212, the eighth weighted value ofthe gain amplifier 358 is −0.523, and the ninth weighted value of thegain amplifier 359 is 0.311.

[0035] In comparison to using software, using the hardware, especially acircuit (such as the gain amplifier and adder) to perform the conversionfrom RGB color model into yuv color model consumes much less time. Thescanner can therefore be operated with a much higher scanning speed.

[0036] Thus, the invention is advantageous to reflect precisely the grayscale response for each pixel while the scanner is performing a grayscale scan.

[0037] Another advantage of the invention includes using hardware toconvert the RGB color model into a different color model to replace thesoftware conversion. Therefore, the time consumption is greatly reduced.

[0038] Other embodiments of the invention will appear to those skilledin the art from consideration of the specification and practice of theinvention disclosed herein. It is intended that the specification andexamples be considered as exemplary only, with a true scope and spiritof the invention being indicated by the following claims.

What is claimed is:
 1. A circuit of a scanner to perform color spaceconversion for a RGB signal, comprisng: a plurality ofsampling-amplified-offset devices, to sample, amplify and compensatelevels of an R charge signal, a G charge signal and a B charge signal,respectively, to obtain an R analog signal, a G analog signal and a Bsignal; an adder, to perform an addition calculation on the R analogsignal, the G analog signal and the B analog signal to obtain anaddition analog signal; and a multiplexer, to select the R analogsignal, the G analog signal, the B analog signal or the addition analogsignal as output.
 2. The circuit according to claim 1, wherein each ofthe sampling-amplified-offset devices further comprises: a correlationdouble sampler, to perform sampling two times on the R, G or B chargesignal, and to perform a subtraction operation on results of the twosamplings to obtain a luminance; a programmable gain amplifier, toadjust a gain value to amplify the luminance, and to obtain an amplifiedluminance according to the gain value; and an offset device, tocompensate level of the amplified luminance to obtain the R, G or Banalog signal of the R, G or B charge signals, respectively.
 3. Thecircuit according to claim 1, wherein each of thesampling-amplified-offset devices further comprises: a correlationdouble sampler, to perform sampling two times on the R, G or B chargesignal, and to perform a subtraction operation on results of the twosamplings to obtain a luminance; an offset device, to compensate a levelof the luminance to obtain a compensated luminance; and a programmablegain amplifier, to adjust a gain value to amplify the compensatedluminance, and to obtain the R, G or B analog signal of the R, G or Bcharge signals.
 4. The circuit according to claim 1, wherein themultiplexer selects the R analog signal, the G analog signal, the Banalog signal or the addition analog signal and outputs the selectedanalog signal to an analog-digital converter, so that the selectedanalog signal is converted into a digital signal.
 5. A circuit of ascanner to perform a color space conversion on an RGB signal,comprising: a plurality of sampling-amplified-offset devices, to sample,amplify and compensate levels of an R charge signal, a G charge signaland a B charge signal, respectively, to obtain an R analog signal, a Ganalog signal and a B analog signal; a gain adder, to multiply each ofthe R, G and B analog signals by a corresponding weighted value, and toadd the R, G and B analog signals multiplied by the weighted values toobtain an addition analog signal; and a multiplexer, to select the Ranalog signal, the G analog signal, the B analog signal or the additionanalog signal as output.
 6. The circuit according to claim 5, whereineach of the sampling-amplified-offset devices further comprises: acorrelation double sampler, to perform sampling twice on the R, G or Bcharge signal and to perform a subtraction operation on results of thetwo samplings to obtain a luminance; a programmable gain amplifier, toadjust a gain value to amplify the luminance and to obtain an amplifiedluminance according to the gain value; and an offset device, tocompensate a level of the amplified luminance to obtain the R, G or Banalog signal of the R, G and B charge signals, respectively.
 7. Thecircuit according to claim 5, wherein each of thesampling-amplified-offset devices further comprises: a correlationdouble sampler, to perform sampling twice on the R, G or B chargesignals and to perform a subtraction operation on results of the twosampling samplings to obtain a luminance; an offset device, tocompensate a level of the luminance to obtain a compensated luminance;and a programmable gain amplifier, to adjust a gain value to amplify thecompensated luminance and to obtain the R, G or B analog signals of theR, G or B charge signal, respectively.
 8. The circuit according to claim5, wherein the gain adder further includes: a plurality of gainamplifiers, to multiply the R analog signal, the G analog signal, the Banalog signal by the corresponding weighted gains to obtain a pluralityof weighted analog signals; and an adder, to add the weighted analogsignals to obtain the addition analog signal.
 9. The circuit accordingto claim 5, wherein the multiplexer selects the R, G or B analog signalsand outputs a selected one to an analog-digital converter, which thenconverts the selected one into a digital signal.
 10. A circuit of ascanner to perform a color space conversion on an RGB signal,comprising: a plurality of sampling-amplified-offset devices, to sample,amplify and compensate levels of an R charge signal, a G charge signaland a B charge signal, respectively, to obtain an R analog signal, a Ganalog signal and a B analog signal; a plurality of gain adders, tomultiply each of the R, G and B analog signals by different weightedvalues to obtain a plurality of results, and to add the results of eachof the R, G and B analog signals into a plurality of addition analogsignals; and a multiplexer, to select the R analog signal, the G analogsignal, the B analog signalor the addition analog signals as output. 11.The circuit according to claim 10, wherein each of thesampling-amplified-offset devices further comprises: a correlationdouble sampler, to perform sampling twice on the R, G or B chargesignals, and to perform a subtraction operation on results of the twosamplings to obtain a luminance; a programmable gain amplifier, toadjust a gain value to amplify the luminance and to obtain an amplifiedluminance according to the gain value; and an offset device, tocompensate level of the amplified luminance to obtain the R, G or Banalog signal of the R, G and B charge signal, respectively.
 12. Thecircuit according to claim 10, wherein each of thesampling-amplified-offset devices further comprises: a correlationdouble sampler, to perform sampling twice on the R, G or B charge signaland to perform a subtraction operation on results of the two samplingsto obtain a luminance; an offset device, to compensate a level of theluminance to obtain a compensated luminance; and a programmable gainamplifier, to adjust a gain value to amplify the compensated luminance,and to obtain the R, G or B analog signal of the R, G and B chargesignal, respectively.
 13. The circuit according to claim 10, whereineach of the gain adders further includes: a plurality of gainamplifiers, to multiply the R analog signal, the G analog signal, the Banalog signal by the corresponding weighted gains to obtain a pluralityof weighted analog signals; and an adder, to add the weighted analogsignals to obtain the addition analog signal.
 14. The circuit accordingto claim 10, wherein the multiplexer selects the R, G or B analogsignals and outputs a selected one to an analog-digital converter, whichthen converts the selected one into a digital signal.